The goal of this experiment was to create a gradient picture and to assign different cost values to areas of the map
What does it mean to be correlated? How might an uneven environment (its easier to have a higher phenotype in some area of the map) impact co-evolution?
Previously I have been looking at how newts and snakes can co-evolve under different genetic architectures (mutation rate and mutation effect size), and have found that while the mean phenotype increases there is no spatial phenotype correlation. This has puzzled me, how can there be a constant increase in phenotype but no spatial phenotype correlation? I think that there might be other factors that lead to spatial phenotype correlation.
I created a simulation study to observe the co-evolutionary outcome of the newt-snake interaction with different genetic architectures (GAs) in a spatial setting. I hypothesized that we would see an interaction (co-evolutionary arms race) between newt and snake phenotype under some GA combinations when newts and snakes were evolving over geographical space. Each GA is paired with another GA creating 16 combinations.
GA1 experiment values:
Each GA combination and trial has its own msprime simulation.
I created a gradient map where at the top there is a higher fitness cost for having a large phenotype (set to 50) and at the bottom there is a lower cost for having a higher phenotype (set to 250). Both newts and snakes are effected by this gradient.
Gradient Map
## All cor, lit, and grid files exist!
## This program will now end!
In this first section I look at the entire populations mean phenotype for both snakes (blue) and newts (red). The difference between mean snake and mean newt phenotype is shown on the black line. For each GA combination there are 4 sets of lines (red, blue, black). Each line is a different trial with the same simulation parameters. I also present the average difference (of the trials) between snake and newt phenotype in the table of average differences.
## Group.1 x
## 1 1e-08_0.005_1e-08_0.005 -0.29984718
## 2 1e-08_0.005_1e-09_0.05 -3.44653016
## 3 1e-08_0.005_1e-10_0.5 -3.57621313
## 4 1e-08_0.005_1e-11_5 -2.08707622
## 5 1e-09_0.05_1e-08_0.005 2.60309532
## 6 1e-09_0.05_1e-09_0.05 -2.40006990
## 7 1e-09_0.05_1e-10_0.5 -1.85289777
## 8 1e-09_0.05_1e-11_5 -1.39021094
## 9 1e-10_0.5_1e-08_0.005 2.63499341
## 10 1e-10_0.5_1e-09_0.05 -0.08488893
## 11 1e-10_0.5_1e-10_0.5 -0.75361424
## 12 1e-10_0.5_1e-11_5 -0.68300489
## 13 1e-11_5_1e-08_0.005 1.22726213
## 14 1e-11_5_1e-09_0.05 -0.03017446
## 15 1e-11_5_1e-10_0.5 -0.88142756
## 16 1e-11_5_1e-11_5 -0.40647817
These results look very similar to the results seen in my other simulations where there is no gradient map. The mean phenotypes of newts and snakes go up, until they reach an equilibrium. Here the aver values are higher than what I have seen before.
Here I plot the interaction between newt/snake phenotype and population size. Typically, when a species had a higher phenotype they also had a larger population size. This relation between phenotype and population size had specific outcomes that depended on the GA of newts and snakes.
The first figure compares the population size of newts and snakes to the difference between mean snake and mean newt phenotype for a time slice (5,000-10,000 generations). Color in this plot is the difference between snake and newt phenotype, with blue indicating snakes have a larger phenotype and red indicating newts have a larger phenotype. Cream color points indicate that the two phenotypes are nearly the same. The second figure present the histograms of the difference between snake and newt population size (green) and phenotype (purple) for a time slice (5,000-10,000 generations).
These results are similar to what I have seen before. There might be an increase in the differences between snake and newt phenotype, but the overall message higher phenotype = more individuals in unchanged. GA3 seems to create the larger difference in mean newt/snake phenotype.
The next section I am examining the spatial correlation between newt and snake phenotypes and I predicted that there would be a positive correlation between the phenotypes. I first look at the correlation between mean newt phenotype and mean snake phenotype for each of the four trials in every GA combination from 10,000-15,000 generations. The solid line is a 0 with a dashed line at the level of correlation seen in natural newt-snake population(s).
In my previous results (no gradient map) I saw no positive spatial phenotype correlation between snakes and newts. Here, with a cost gradient map I see that there are quite a few simulations where newt and snake local mean phenotypes are correlated when compared across space.
In order to understand how spatial correlations where changing with time I took 5,000 generation time slices to look at all four trials correlation values. Each color is a different trial per GA combination. The histogram values are stacked.
Spatial phenotype correlation increases for most of the simulation as I move through the time slices. Once a simulation reach a high spatial phenotype correlation, it did not go back down. The simulations where non surpassed the empirical newt and snake spatial phenotype correlation all contained a genetic architecture that had a small mutational varance.
Next, I examine three randomly chosen plots. Time (in generations) in on the x-axis and both mean phenotype and phenotype spatial correlation in on the y-axis. Newt whole population mean phenotype is red, while snake mean phenotype is blue. The pink line is the phenotype spatial correlation.
## [1] "pattern 1e-08_0.005_1e-09_0.05_2"
## [1] "Cor between average snake pheno and local cor -0.418764106136105"
## [1] "Cor between average newt pheno and local cor -0.566775063273"
## [1] "Cor between average dif pheno and local cor 0.552202609160458"
## [1] "Cor between newt pheno and snake 0.290549481165078"
## [1] "pattern 1e-10_0.5_1e-11_5_1"
## [1] "Cor between average snake pheno and local cor 0.958132870341425"
## [1] "Cor between average newt pheno and local cor 0.938412525731354"
## [1] "Cor between average dif pheno and local cor 0.157577639506165"
## [1] "Cor between newt pheno and snake 0.935334780395545"
## [1] "pattern 1e-08_0.005_1e-09_0.05_1"
## [1] "Cor between average snake pheno and local cor 0.157821042410949"
## [1] "Cor between average newt pheno and local cor 0.227449874760926"
## [1] "Cor between average dif pheno and local cor -0.222596604124799"
## [1] "Cor between newt pheno and snake 0.555482222029643"
Most of these plots show that as time increases both the mean newt & snake phenotype as well as the spatial phenotype correlation (pink line) increase (very few show no change). Spatial phenotype correlation increases the most when the newt and snake mean phenotypes are increasing the most. Some of these plots are very interesting to see.
This next section is just getting a glimpse at how newt & snake phenotype and population size differ over time. The populations start off with about 250 individuals each. Each individual has a different genetic background created from msprime. Then each msprime simulation is put into slim and data is generated. Plots show newt by snake population size, with the point color representing the difference between mean snake and newt phenotype (red=newts have a higher phenotype and blue=snakes have a higher phenotype). The other plots show histograms of difference between snakes and newts phenotype and population size (purple and green).
The results looked similar to results that I have seen in other experiments. In the beginning of the simulation both newt and snake population grows. The difference in phenotype quickly becomes polarized. The population size reaches a steady point and then newts and snakes co-evolve. In the middle part of my simulation, the difference between newt and snakes mean phenotype solidifies. Often, the difference in mean phenotype decreases (where compared to the beginning of the simulation). When the GA has a high mutation rate and low mutation effect size (GA 1), the difference in mean phenotype grows. This leads to the species with GA 1 losing the co-evolutionary arms race. More frequent smaller steps does not help a species win in an arms race (might also be due to lower mutational variance). The histograms reflect what is seen in the scatter plots.
In the summary section, I try to come up with a way to show how different GA combinations can change the simulations results. In all of these plots snakes GA is represented by color and newt GA is represented by shape. There 16 color-shape combinations (with 4 repeats for trials). There are four sets of plots: 1) newt by snake population size, 2) phenotype difference by snake population size, 3) phenotype difference by snake GA, and 4) phenotype difference by newt GA. There are three figures in each set, taken at the begging, middle, and end time chunks.
Firstly, these plots are very similar to the plots seen without a gradient map and have the same results. There are clusters of points that create lines of shapes and lines of colors. The best GA for newts and snakes was 1e-09_0.05 (can be seen as green near the top of all the lines of shapes and triangles near the bottom right look at all the lines of color). It is interesting to see how these points spread apart, but remain similar between trials. When putting these figures together it seems like the population size of snakes is lower when the newt phenotype is larger than the snake phenotype.
In the heatmap plots each GA combination and trails is presented by combining newt GA in the x-axis to snake GA and trial number in the y-axis. The result is the color in that section. There are two types of heatmap plots shown below. One shows the average snake population size for a time chunk with darker colors indicating a smaller snake population and lighter colors indicating a larger snake population. The other heatmap shows the average difference between snake and newt mean phenotype (red=newts had a higher phenotype, blue=snakes had a higher phenotype). I look at 3 time slices for both types of heatmaps.
Heatmap results are very similar to the no cost gradient maps. They star off sort of neutral, but each trial of the GA combination creates very similar patterns. Which shows that under certain GA either newts or snakes have an co-evolutionary advantage (1e-9(0.05)^2 = 2.5e-12 or 1e-10(0.5)^2 = 2.5e-11). The cost gradient results look more dramatic than the results with out the map.
This section goes over the results from the local measurements (grid calculations). I divided my map up into smaller area (grids) and calculated mean phenotype, max phenotype, min phenotype, and population size. In each of these plots newts are represented by circles and snakes are represented by squares. Parameter values increase from a dark color to a lighter color (green-blue themed for phenotype, orange-pinked themed for population size) There is also a subplot that plots each parameter (mean, max, …) of newt by snake colored by map location (red=corner, green=edge, blue=middle). I look at the one simulation at one time in the begging and end.
## [1] 0.8463514
## [1] 0.6621679
## [1] 0.6947351
## [1] 0.4763849
## [1] 0.7665938
## [1] 0.6795915
## [1] 0.7917928
## [1] 0.4143043
Newt and snake phenotypes are positively spatially correlated. Newt and snake population sizes are negativly correlated (look at the mini plots and not the values)